package com.halixun.d2app.utils;

import android.view.View;

/**
 * @ProjectName: D2App
 * @Package: com.halixun.d2app.utils
 * @ClassName: SystemUIUtils
 * @Description: java类作用描述
 * @Author: hdx
 * @CreateDate: 2019/11/28 18:00
 * @UpdateUser: hdx
 * @UpdateDate: 2019/11/28 18:00
 * @UpdateRemark: 更新说明：
 * @Version: 1.0
 */
public class SystemUIUtils {
    public static void setStickFullScreen(View view) {
        int systemUiVisibility = view.getSystemUiVisibility();
        int flags = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
                | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
                | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
        systemUiVisibility |= flags;
        view.setSystemUiVisibility(systemUiVisibility);
    }
}
